using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace RentalService.Entities
{
    public partial class RentalContext : DbContext
    {
        public RentalContext()
            : base("name=RentalContext1")
        {
        }

        public virtual DbSet<landlordTenant> landlordTenant { get; set; }
        public virtual DbSet<ProcessItem> ProcessItem { get; set; }
        public virtual DbSet<ProcessStepRecord> ProcessStepRecord { get; set; }
        public virtual DbSet<ProcessTemplate> ProcessTemplate { get; set; }
        public virtual DbSet<Role> Role { get; set; }
        public virtual DbSet<RoleResourceModule> RoleResourceModule { get; set; }
        public virtual DbSet<Staff> Staff { get; set; }
        public virtual DbSet<StaffService> StaffService { get; set; }
        public virtual DbSet<SystemResourceModule> SystemResourceModule { get; set; }
        public virtual DbSet<House> House { get; set; }
        public virtual DbSet<HouseRecord> HouseRecord { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<ProcessStepRecord>()
                .Property(e => e.Id)
                .IsUnicode(false);

            modelBuilder.Entity<ProcessStepRecord>()
                .Property(e => e.Type)
                .IsUnicode(false);

            modelBuilder.Entity<ProcessStepRecord>()
                .Property(e => e.WaitForExecutionStaffId)
                .IsUnicode(false);

            modelBuilder.Entity<ProcessStepRecord>()
                .Property(e => e.RefOrderId)
                .IsUnicode(false);

            modelBuilder.Entity<ProcessTemplate>()
                .Property(e => e.Id)
                .IsUnicode(false);

            modelBuilder.Entity<ProcessTemplate>()
                .Property(e => e.Type)
                .IsUnicode(false);

            modelBuilder.Entity<ProcessTemplate>()
                .Property(e => e.WaitForExecutionStaffId)
                .IsUnicode(false);
        }
    }
}
